<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<button class="button" @click="click">拉起B包授权</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		onLoad() {
		},
		methods: {
			click(){
				// #ifdef APP-PLUS
				if(plus.runtime.isApplicationExist({pname:'uni.UNI8264056',action:'myuniapptest://'})){
					plus.runtime.openURL('myuniapptest://xxx.xxx.com?account=123 ', error => {
						uni.showModal({
							title: '失败',
							content: JSON.stringify(error),
							success: data => {}
						});
					});			
				}else{
					console.log("B包未安装");
				}
				// #endif
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.button {
		width: 60%;
		margin-top: 90rpx;
	}
</style>
